// pages/show/orders/index.js
const APP = getApp()
Page({
  data:{
    info:[]
  },
  onLoad:function(options){
    // 页面初始化 options为页面跳转所带来的参数
    var type_=options.type
    var id=options.id
    var that=this
    if(type_ == "photo"){
        that.setData({
          info:[
            {
              pic:id
            }
          ]
        })
    }else{
      wx.showToast({
        title: '加载中',
        icon: 'loading',
        duration: 10000
      })
      APP.HttpService.getShowOrder({
        type_:type_,
        id:id
      }).then(data=>{
        if(data.meat.code == 0){
            wx.hideToast()
            that.setData({
              info:data.info
            })
        }
      })
    }
  },
})